﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bingosoft.Modules.SecurityConsole.Role;
using Bingosoft.Web.Utils;
using Bingosoft.Modules.SecurityConsole.User;

namespace Bingosoft.WebApp.Modules.SecurityConsole.User
{
    public partial class OrgAndRoleAdd : System.Web.UI.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnOK_Click(object sender, EventArgs e)
        {
            string userId = Request.QueryString["userId"];
            string orgId = hfOrgId.Value;
            string[] roleIdArr = hfRoleIds.Value.Split(',');
            UserService userService = new UserService();
            userService.AddWfUserOrgRoles(userId, orgId, roleIdArr);
            ScriptHelper.CloseDialog(this, "true");
        }
    }
}